Date Arithmetic Tester Utility
The Date Arithmetic Tester utility, named AbatDateTest, is a stand-alone program that allows you to enter a date arithmetic expression followed by a range of dates that will be considered as “Today” for the purposes of testing the expression. To access this application from AbatConsole, click on the Tools menu item, then select Date Arithmetic Tester Utility.
The tester utility provides you with the ability to see the results of your date arithmetic expression to ensure that it meets your expectations.
Expression to Test: You enter the date arithmetic tag expression that you would like evaluated. Any other data entered is ignored and will be present in the test output column. This control allows you to see the last “n” occurrences of date tag expressions entered. A Clear List button to the right allows you to clear the currently entered expression.
Interval: This value indicates the number of days to use when testing the expression between the From and To dates. By default, the value is one (1) day. If the value exceeds the total range of possible dates, an error is produced.
From/To Dates: These fields allow you to test your expression across a range of dates. That way you can determine whether the date expression meets your needs. By default, the current full month is selected. To specify a single day, set From and To with the same value.
Table of Results: This table contains two (2) columns. The test date and the resulting output from the expression. A Clear button appears at the bottom left edge of the table. This allows you to manually clear the results table. By default, the results table is cleared for each expression test. Two (2) options are available: Do not clear before each expression… and Do not compact results. A Clear results is also available for manual clearing. By default, if the same result is produced for all given input dates, AbatDateTest will compact the results into a beginning and ending date entry.
Example:
In the image below, the expression to evaluate is <BOM/+Monday>. The BOM command returns a date that is the beginning of the month. Added to the date is +Monday. This means the first Monday of the month.
The date arithmetic tester, as it is configured below, evaluates the date arithmetic expression every 31 days, from 10/1/2023 to 12/31/2024. These properties are configurable. The tester allows you to see what the results would be if the date arithmetic expression was computed on the dates listed in the leftmost column.